package com.chang.diy;

import com.chang.diy.bean.AnnotationApplicationContext;
import com.chang.diy.bean.ApplicationContext;
import com.chang.diy.service.UserService;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;

public class TestUser {
    public static void main(String[] args) throws IOException, ClassNotFoundException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        ApplicationContext context = new AnnotationApplicationContext("com.chang.diy");
        UserService service = (UserService) context.getBean(UserService.class);
        System.out.println(service);
        service.add();
    }
}
